use_frameworks!

platform :ios, '13.0'

target 'TUILiveKitApp' do
  # UI Library
  pod 'SnapKit'
  pod 'Kingfisher'
  # Tools Library
  pod 'Alamofire'
  # Local Library
  pod 'TUILiveKit', :path => '../TUILiveKit'
  pod 'RTCCommon', '>= 1.0.2'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
      config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
      config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
      config.build_settings['GENERATE_INFOPLIST_FILE'] = "NO"
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
    end
    shell_script_path = "Pods/Target Support Files/#{target.name}/#{target.name}-frameworks.sh"
    if File::exist?(shell_script_path)
          shell_script_input_lines = File.readlines(shell_script_path)
          shell_script_output_lines = shell_script_input_lines.map { |line| line.sub("source=\"$(readlink \"${source}\")\"", "source=\"$(readlink -f \"${source}\")\"") }
          File.open(shell_script_path, 'w') do |f|
            shell_script_output_lines.each do |line|
              f.write line
        end
      end
    end
  end
end
